package com.hzlj.position.locate.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzlj.position.locate.common.model.ReportInitiativeSettingJzry;
import com.hzlj.position.locate.mapper.ReportInitiativeSettingJzryMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 通信联络核查-人脸签到-配置表-关联矫正人员(ReportInitiativeSettingJzry)表操作类
 *
 * @author lifh
 * @date 2023-11-10 18:31:54
 */
@Repository
public class ReportInitiativeSettingJzryDao extends ServiceImpl<ReportInitiativeSettingJzryMapper, ReportInitiativeSettingJzry> {
    /**
     * 删除数据
     */
    public boolean deleteReportInitiativeSettingJzry(List<String> jzIds) {
        LambdaUpdateWrapper<ReportInitiativeSettingJzry> updateWrapper = new UpdateWrapper<ReportInitiativeSettingJzry>().lambda()
                .in(ReportInitiativeSettingJzry::getJzId, jzIds);
        return this.remove(updateWrapper);
    }


    public Boolean exists(List<String> settingIds) {
        LambdaQueryWrapper<ReportInitiativeSettingJzry> queryWrapper = new QueryWrapper<ReportInitiativeSettingJzry>().lambda()
                .in(ReportInitiativeSettingJzry::getSettingId, settingIds);
        return this.exists(queryWrapper);
    }
}

